home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 168
/
168.d81
/
precess sat
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
4KB
|
110 lines
5 poke55,0:poke56,56
10 dv=peek(186):ifdv<8thendv=8
15 poke53371,0
20 poke53272,31
25 ad=49152
30 sysad:sysad+12
35 dimgm(9),j2(9),r(9)
36 gosub185
37 bs$="[159][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164]"
40 print"[147]":poke53280,.:poke53281,.:sysad+9,13
41 print"[159][220][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][221]"
42 printbs$""tab(38)bs$
43 print"[159][255][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][161]"
44 tq=ti
45 print"";tab(6)"[150] [208][210][197][195][197][211][211][201][207][206] [207][198] [193] [211][193][212][197][204][204][201][212][197] "
55 printtab(8)"[153] [208]ick a [200]eavenly [194][207][196][217]: "
60 printtab(3)"0. [158][205]ercury 3. [158][205]oon 6. [158][211]aturn"
65 printtab(3)"1. [158][214]enus 4. [158][205]ars 7. [158][213]ranus"
70 printtab(3)"2. [158][197]arth 5. [158][202]upiter 8. [158][206]eptune"
72 printtab(9)"9. [153][211]atellite listings"
75 geta$:ifa$<"0"ora$>"9"then75
80 j=val(a$)
83 ifj=9thengoto270
85 sysad+9,6
90 printtab(2)"[153][193]ltitude of its orbit: ";:l9%=8:gosub1250:a=q9
95 printtab(2)"[153][201]nclination to equator ([219]s): ";:l9%=4:gosub1250:i=q9
100 i=i/rd:rem convert to radians
105 poke214,10:print:printtab(8)"[201]s this [195]orrect? [150][217]/[206]":poke198,0
106 gethc$:ifhc$<>"y"andhc$<>"n"then106
107 ifhc$="n"thengoto40
110 k1=r(j)*r(j)*(r(j)+a)^-3.5*sqr(gm(j))
115 n=-1.5*k1*j2(j)*cos(i)
120 p=.75*k1*j2(j)*(5*cos(i)*cos(i)-1)
125 n=n*rd*s:p=p*rd*s:rem radians/sec to deg/day
130 sysad+9,14
132 poke214,10:print:printtab(1)"[150][162][162][162][162][162][162][162][162][162][162][162][155][212]he [210][197][211][213][204][212][211][160]are[150][162][162][162][162][162][162][162][162][162][162][162]"
135 print:printtab(6)"[155]-[153][208]recession of the [206][207][196][197][155]-"
140 printtab(6)"";n;"[158][219]s per day"
145 printtab(6)"";n*y;"[158][219]s per year"
150 print:printtab(5)"[155]-[153][208]recession of [208][197][210][201][195][197][206][212][197][210][155]-"
155 printtab(6)"";p;"[158][219]s per day "
160 printtab(6)"";p*y;"[158][219]s per year"
162 ifti<tq+500then162
165 gosub40000
175 restore:poke198,.:goto40
185 rem read in data
190 rd=180/(NULL):rem radians to degrees
195 y=365.2422:rem days per year
200 s=86400:rem seconds per day
205 forj=0to8:readgm(j):next
210 rem planetary gm's (km^3/s^2)
215 data22032,324860,398600,4902,42828
220 data125680000,37931000,5793900,6835000
225 forj=0to8:readj2(j):next
230 rem planetary j2's
235 data.00006,.0000186,.001083,.0002027
240 data.00196,.014736,.016480,.003345,.0043
245 forj=0to8:readr(j):next
250 rem planetary radii (km)
255 data2440,6050,6378,1738,3398
260 data71492,60268,25559,24760
265 return
270 print"[147]":sysad+9,12
275 print"[211]atellite [200]eight(km) [201]nclination [219]'s"
280 print"[155][197]-[153][205]oon [158] 384,400 [159]18.3-28.6"
285 print"[155][197]-[153][195][207][194][197] [158] 890 [159] 99"
290 print"[155][197]-[153][205]ir [158] 414 [159] 51.6"
295 print"[155][205]-[153][208]hobos [158] 5,380 [159] 1"
300 print"[155][202]-[153][201]o [158] 421,600 [159] .04"
305 print"[155][202]-[153][197]uropa [158] 670,900 [159] .47"
307 print"[155][202]-[153][199]anymede [158] 1,070,000 [159] .19"
310 print"[155][202]-[153][195]allisto [158] 1,883,000 [159] .28"
315 print"[155][202]-[153][195]arme [158]22,600,000 [159] 163"
320 print"[155][211]-[153][205]imas [158] 185,520 [159] .942"
325 print"[155][211]-[153][196]ione [158] 377,400 [159] .02"
327 print"[155][211]-[153][197]nceladus[158] 238,020 [159] .02"
330 print"[155][211]-[153][212]itan [158] 1,221,850 [159] .33"
332 print"[155][211]-[153][208]hoebe [158]12,952,850 [159] .13"
333 print"[155][211]-[153][210]hea [158] 527,040 [159] .35"
335 print"[155][213]-[153][205]iranda [158] 129,780 [159] 3.4"
337 print"[155][213]-[153][212]itania [158] 435,840 [159] 0"
340 print"[155][213]-[153][213]mbriel [158] 265,970 [159] 0"
342 print"[155][213]-[153][207]beron [158] 582,600 [159] 0"
345 print"[155][206]-[153][212]riton [158] 354,800 [159] 157"
350 print"[155][206]-[153][206]ereid [158] 5,513,400 [159] 29"
355 printtab(10)"[150][193]ny key for [215]ork [211]creen":poke198,0
360 gethc$:ifhc$=""then360
365 goto40
1250 q9$="":poke198,.
1255 geta$
1260 poke646,rnd(1)*15+1:print"*[157]";:ifa$=""then1255
1265 ifa$=chr$(13)thenprint" ":q9=val(q9$):return
1270 if(a$=chr$(20)andlen(q9$))thenq9$=left$(q9$,len(q9$)-1):goto1300
1275 iflen(q9$)>=l9%thensysad+9,2:goto1255
1280 if(a$>="0"anda$<="9")ora$="."ora$="-"then1290
1285 goto1255
1290 q9$=q9$+a$
1295 print""a$;:sysad+9,6:goto1255
1300 print" [157][157] [157]";:goto1255
10000 d=peek(186):n$="precess sat":open15,d,15,"s0:"+n$:close15:saven$,d:end
40000 poke214,20:print:printtab(8)"[155](1[155]) [154][212]ry another one
40010 [153][163]8)"list(2list) cont(NULL)o (NULL)(NULL)right$(NULL)val(NULL)(NULL)val (NULL)enu
40020 poke198,0:sysad+9,15
40030 geta$:ifa$<"1"ora$>"2"then40030
40040 ifa$="1"thenreturn
40050 sysad+15
40060 print"[147][144]load"chr$(34)"b.universe ii"chr$(34)","dv
40070 print"run28"
40080 poke631,13:poke632,13:poke198,2:end